
#ifndef wu_FILM_XML_SHAPE_MANAGER_H
#define wu_FILM_XML_SHAPE_MANAGER_H

#pragma once
#include "wuBase2dManager.h"
#include "wuFilmXMLShape.h"

class wuFilmXMLShapeManager : public wuBase2dManager
{
    public:
        wuFilmXMLShapeManager();
        ~wuFilmXMLShapeManager();

	    void setup(string _XMLfilename, ofxBox2d * _box2d, int _vw, int _vh);
        void update();
		bool action(ofImage *currImg, ofImage *bgImg, int action, int x_offset);
		void addBitxo(ofImage *_skin, ofRectangle rect, vector <ofPoint> * _pts);
        void draw(bool pinta_bg=false, int offX=0);
        void drawSelected(bool pinta_bg=false, int offX=0);
        void clear(void);
		void OrderSkins();
		void touch(int _x,int _y, int forceX=300, int forceY=0);
		bool drag(int _x, int _y);
		void dragOff();
        void autoPosition(bool _bAuto=true);
        void setLoop(bool _bLoop);
        void setScrollOffset(int _scrollOffset);
        void clear_actives();

// 		vector <wuFilmXMLShape> films;
 		wuFilmXMLShape films[10];
 		int XMLFilmShape_num;

		// skins of pieces
        vector <wuSkin> skins;

		bool bAuto, bLoop;
//		bool bSkinOn, bGo;
		string XMLfilename;

		ofxBox2d * box2d;
};
#endif

